package com.onlyphoto.onlymall.base;


import android.content.Context;

import java.lang.ref.WeakReference;
/**
 * Created by gaochujia on 2019-6-26.
 */
public class BasePresenter<V extends IBaseView, M extends BaseModel> {
    protected V mView;
    protected M mModel;

    protected WeakReference<Context> mContext = null;
    //  protected Context mContext;

    public BasePresenter(Context mContext, V mView, M mModel) {
        this.mView = mView;
        this.mModel = mModel;
        this.mContext = new WeakReference<>(mContext);
    }

    public void onDestroy() {
        if (mModel != null) {
            mModel.onDestroy();
        }
    }
}
